;; Sri Ganeshji : Sri Balaji : Sri Pitreshwarji : Sri Durgaji : Sri Venkateshwara

/*
Objective(s)  
- 	This code demonstrates how Text File can be opened to perform Read and Write Operations.

Last modification  
-	Altered on 14/08/2010
*/

[Function: TSPL Smp Write Ledgers to Text]

	Variable    : Temp 		: String	: ""

	10	: OPEN FILE			: "ChartofAccounts.txt" 	: Text : Write  

	20  : WALK COLLECTION 	: TSPL Smp Ledger Info
	30  :   WRITE FILE LINE : $Name + ", " + $Parent
	40 	: END WALK
	50 	: CLOSE TARGET FILE
	60	: EXEC COMMAND		: Notepad	: "ChartofAccounts.txt"

[Function: TSPL Smp Read Ledgers from Text]

	10  : OPEN FILE 		: "ChartofAccounts.txt" : Text : Read
	20  : WHILE : (TRUE)
	30  :	LOG	: $$FileRead
	40  : 	IF 	: $$FileIsEOF
	50  :   	BREAK
	60  : 	END IF
	70  : END WHILE
	80  : CLOSE FILE
	90	: EXEC COMMAND	: "TDLFunc.LOG"

;; End-of-File
